The present invention relates to a position detecting apparatus which can be used for position measurement in, for example, a semiconductor manufacturing apparatus and machine tools such as a lathe, a milling machine and the like.
FIG. 1 is an oblique projection constructional view showing an example of an optical encoder which is known as a conventional position detecting apparatus. The position detecting apparatus comprises a first diffraction grating (which is referred to as "first grating" hereinafter) 1, a second diffraction grating (which is referred to as "second grating" hereinafter) 2 which is disposed at the back of the first grating 1 and which is capable of moving relative to the first grating 1 in a direction of the arrow shown in FIG. 1, and a photo detector 3 disposed behind the second grating 2. The first grating 1 and the second grating 2 have grating portions alternating at a predetermined interval (which is referred to as "grating pitch" hereinafter), the grating portions comprise portions (which are referred to as "transparent portions" hereinafter) which allow lights to pass through and portions (which are referred to as "non-transparent portions") which block passage of lights. Particularly, for the second grating 2 there are provided two grating portions having a predetermined phase difference relative to each other. The photo detector 3 is connected to a data converting section 5 to convert outputs of the photo detector 3 into positional data to be outputted.
In the above configuration, when parallel light beams L are irradiated to the first grating 1, only the light beams which have passed through the first grating 1 and the second grating 2 are received by the photo detector 3, in which the incident rays are converted to an electric signal according to the light intensity thereof. The electric signal can be obtained from variations of a quantity of light having passed through the first grating 1 and the second grating 2 in accordance with the relative displacement of the gap between the first grating 1 and the second grating 2. Consequently, the electric signal is formed of the displacement signal having a fundamental period of the grating pitch. Furthermore, the displacement signal must theoretically, be a triangular wave signal proportional to a variation of the apparent transparent portion which is, when viewed from the irradiating point, formed by the extent to which the first grating 1 and the second grating 2 overlap each other. In practice, however, the displacement signal forms a pseudo-sine wave because the triangular wave is rounded by the effects light diffraction and so on. The distortion rate of the displacement signal changes to a great extent depending upon the gap or space between the first grating 1 and the second grating 2. FIG. 2 shows the behavior of variations of the displacement signal with respect to variation of the grating gap ranging from 0.04.times.P.sup.2 /.lambda. to 0.275.times.P.sup.2 /.lambda. (here, P denotes grating pitch, and .lambda. denotes wave length of the light source). The variations of the distortion rate are primarily caused by periodic signals (which are respectively referred to as "third higher harmonic component" and "fifth higher harmonic component" hereinafter) having one-third or one-fifth the period of a fundamental wave. Amplitude ratios of the fundamental wave component, the third higher harmonic component and the fifth higher harmonic component of the displacement signal are plotted with respect to the value of the grating in FIG. 3, and the partial enlargement thereof is shown in FIG. 4. Each of these components can be approximately defined by the following expression (1), where f(x) is taken as the displacement signal. ##EQU1## where x denotes displacement and z denotes the grating gap.
It should be noted that even higher harmonic components as well as offset components can be generally canceled by proper optical arrangement, and the higher harmonic components of the seventh, and ninth order and higher, having little effect on the detecting precision, can be neglected and assumed to be zero. In the case where a low coherent light source such as an LED or the like is employed, the displacement signal f(x) is damped in its amplitude in proportion to an increment of the grating gap. The displacement signal, however, holds the basic characteristics equal to the above expression (1).
Supposing that signals W.sub.a and W.sub.b outputted from the photo detector 3 have a phase difference of .pi./2(rad) relative to each other, the signals W.sub.a and W.sub.b are represented by the following expression (2). ##EQU2## The data converting section 5 includes comparators and resistance arrays to shift phases of the signals W.sub.a and W.sub.b, and determines positional data P.sub.os to be outputted.
In the above conventional method, the displacement signal having the above described characteristics has been used in which the distorted waveform closest to sine wave has been adapted, whereby no existing grating gap is sufficient to obtain a fundamental wave component in which both the third and fifth higher harmonic components are rendered zero. Consequently, the third and fifth higher harmonic components disadvantageously have caused errors to a significant extent in the detected displacement quantity. As is shown in FIG. 4, for example, even though a condition is set up so that the grating gap is to be Z.sub.2 ' in order to eliminate the third higher harmonic component to obtain a less distorted waveform, the fifth higher harmonic component is liable to create significant errors.